package com.qf.day07.tuxing;

public class Circle extends Tuxing{
    private double r;

    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    @Override
    public double zc() {
        super.zc();
        double pai =3.14;
        double zc = 2*pai*r;
        System.out.println("圆的周长为："+zc);
        return zc;

    }

    @Override
    public void area() {
        super.area();
        double pai =3.14;
        double area = pai*r*r;
        System.out.println("圆的面积为："+area);
    }

    public Circle(String name, double r) {
        super(name);
        this.r = r;
    }

    public Circle() {
    }
}
